# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

---
version: '2'

services:

  PTE:
    container_name: PTE
    image: pte:latest
    network_mode: bridge
    hostname: PTE
    environment:
      - TESTCASE=$TESTCASE
      - TESTCASE_QUERY=${TESTCASE_QUERY}
      - CHAINCODE={{ chaincode }}
{% for channel in channels %}
      - CHANNEL{{ loop.index }}={{ channel.name }}
{% endfor %}
{% for peer in peers %}
      - PEER{{ loop.index }}={{ peer.name }}
{% endfor %}
    volumes:
      - {{ fabricworkdir }}/keyfiles:/var/hyperledger/fabric/artifacts
      - {{ fabricworkdir }}/CISCFiles:/opt/gopath/src/github.com/hyperledger/fabric-test/fabric-sdk-node/test/PTE/CITest/CISCFiles
      - {{ fabrictestpath }}/chaincodes:/opt/gopath/src/github.com/hyperledger/fabric-test/chaincodes
      - {{ fabrictestpath }}/Logs:/opt/gopath/src/github.com/hyperledger/fabric-test/fabric-sdk-node/test/PTE/CITest/Logs
      - {{ fabricworkdir }}/run/keyfiles:/var/hyperledger/allorgs
